/**
 * Created by user on 2015/9/21.
 */

var messageUtil = require('../../../common/utils/messageUtil');
var toolUtil = require('../../../common/utils/toolUtil');

exports.uploadImage = function (req, res) {

    toolUtil.uploadImageService(null, null, req, function (err, images) {
        if (err) {
            res.json(messageUtil.composeFailedMessage(req, 'Failed to upload Images... - ' + err.message));
        } else {
            res.json(messageUtil.composeSucceededMessage(req, null, images));
        };
    });
};
